﻿@using FwProject.PrePaymentInfo.Dto
@using FwProject.PrePaymentInfo
@using FwProject.ManagerConfig.Dto
@model PrePaymentPrintDto
@{
    ConfigInfoDto config = ViewBag.Config;
}

<link href="/css/print.css" rel="stylesheet" />
<style type="text/css">

    .input-group[class*=col-] {
        padding: 0 15px;
    }


    .PageNext {
        page-break-after: always;
    }

    * {
        word-wrap: break-word;
        word-break: break-all;
    }

    table {
        border-collapse: collapse;
        border-spacing: 0px;
    }
</style>

<object id="factory" viewastext style="display:none" classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
        codebase="/scripts/smsx.cab#Version=6,2,433,70"></object>
<!-----------------------------【smsx.cab】打印--------------------------->
<form name="printformName" id="printformName" action="" method="post">
    <div align="center">
        <div id="printObj" style="width: 190mm" align="center">

            <!-----------------------------【smsx.cab】打印--------------------------->
            <!--打印前初始化设置-->
            <script language="javascript">
                p_init({
                    portrait: true//true纵向,false横向
                });
            </script>

            <p>
                @*<input type="button" name="pagesetupBtn" value="打印设置" onclick="p_pagesetup();" />
                    <input type="button" name="previewBtn" value="打印预览" onclick="p_preview();" />*@
                <input type="button" name="printBtn" class="noprint" value="打印" onclick="pagePrint();" />
            </p>
            <!-----------------------------【smsx.cab】打印--------------------------->
            <div align="center" style="font-size: 14px; margin-top: 3px; margin-bottom: 15px; font-weight: bold;">
                @config?.CorporateName<br />
                预收单
            </div>

            <table width="100%" cellspacing="0" cellpadding="0" align="center" border="0">
                <tr>
                    <td width="10%"><b>单号</b>:</td>
                    <td>&nbsp;@Model.PrePaymentInfoNumber</td>
                    <td width="10%"><b>日期</b>:</td>
                    <td>&nbsp;@Model.CreationTime.ToString("yyyy-MM-dd")</td>

                </tr>
                <tr>
                    <td width="10%"><b>餐厅</b>:</td>
                    <td>&nbsp;@Model.RestaurantInfoName</td>
                    <td><b>经办人</b>:</td>
                    <td>&nbsp;@Model.AgentPeoper</td>
                </tr>
                <tr>
                    <td><b>账户</b>:</td>
                    <td>&nbsp;@Model.AccountName</td>
                    <td><b>退还金额</b>:</td>
                    <td>&nbsp;@Model.PrePaymentPrice.ToString("C")（<b>预收款余额：</b>@((Model.PreviousPrice-Model.PrePaymentPrice).ToString("C"))）</td>

                </tr>
                <tr>
                    <td><b>备注信息</b>:</td>
                    <td colspan="3">&nbsp;@Model.RemarkContent</td>
                </tr>
            </table>
            <hr />
            <table width="100%" cellspacing="0" cellpadding="0" align="center" border=0>
                <tr>
                    <td width="30%" align="left"><b>[制单]</b>&nbsp;@Model.AgentPeoper&nbsp;@Model.CreationTime.ToString("yyyy-MM-dd")</td>
                    <td width="30%" align="left"><b>[提交]</b>&nbsp;@Model.AgentPeoper&nbsp;@Model.CreationTime.ToString("yyyy-MM-dd")</td>
                    <td width="30%" align="center"><b>[审核]</b>&nbsp;@Model.AgentPeoper&nbsp;@Model.CreationTime.ToString("yyyy-MM-dd")</td>
                </tr>
            </table>

        </div>
    </div>
</form>
<script src="~/js/Print.js"></script>
<script>
    var loadInfo = function () {
        //$("#printObj").css({ "width": "270mm" });
        p_init(printInit);
    };
    $(function () {
        loadInfo();
    });

    function pageSet() {
        try {
            p_pagesetup();
        } catch (e) {
            wb.execwb(8, 1);
        }
    }
    function pageView() {
        try {
            p_preview();
        } catch (e) {
            wb.execwb(7, 1);
        }
    }
    function pagePrint() {
        try {
            p_print();
        } catch (e) {
            wb.execwb(6, 6);
        }
    }
</script>

